package com.enqualcomm.kids.mvp.reai;


import android.app.Activity;
import android.text.TextUtils;

import com.enqualcomm.kids.bean.Constellation;

/**
 * Created by yinzhiqun on 2016/2/23.
 */
public class ConstellationUtil {

    //3.21-4.19白羊
    //4.20-5.20金牛
    //5.21-6.21双子
    //6.22-7.22巨蟹
    //7.23-8.22狮子
    //8.23-9.22处女
    //9.23-10.23天秤
    //10.24-11.22天蝎
    //11.23-12.21射手
    //12.22-1.19摩羯
    //1.20-2.18水瓶
    //2.19-3.20双鱼


    public static Constellation birthdayToConstellation(Activity ac, String birthday){//2016-02-23
        Constellation constellation = null;
        if (!TextUtils.isEmpty(birthday)){
            int month = 0;
            int day = 0;

            try {
                String[] split = birthday.split("-");
                month = Integer.parseInt(split[1]);
                day = Integer.parseInt(split[2]);
            }catch (Exception e){
                e.printStackTrace();
            }

            constellation = Constellation.getInstance(ac,month,day);
        }
        return constellation;
    }
}
